<?php
namespace Home\Controller;
class IndexController extends BaseController {

    public function index(){
        $user = M('user')
            ->alias('u')
            ->join('buy_list as bl on bl.user_id = u.user_id ')
            ->field('u.name, bl.buy_id, bl.goods_id, bl.user_id')
            ->select();

        p($user);
    }

}
